home *** CD-ROM | disk | FTP | other *** search
/ Inside Magic / Inside Magic.iso / mac / Inside Magic™ / Inside Magic™.dxr / 01844.ls < prev    next >
Encoding:
Text File  |  1995-09-28  |  1018 b   |  38 lines

  1. on speedMovie
  2.   global gSpeed
  3.   set thismovie to the name of cast the castNum of sprite 2
  4.   repeat while the mouseDown
  5.     cursor(200)
  6.     set gMoviePixel to 2.0 / 350
  7.     set beginH to the locH of sprite 3
  8.     if the mouseH <> beginH then
  9.       if the mouseH < beginH then
  10.         if the mouseH < 258 then
  11.           set the locH of sprite 3 to 258
  12.           set gSpeed to 0
  13.         else
  14.           set difH to beginH - the mouseH
  15.           set the locH of sprite 3 to the mouseH
  16.           set gSpeed to gSpeed - (difH * gMoviePixel)
  17.         end if
  18.       else
  19.         if the mouseH > 467 then
  20.           set the locH of sprite 3 to 467
  21.           set gSpeed to 2
  22.         else
  23.           set difH to the mouseH - beginH
  24.           set the locH of sprite 3 to the mouseH
  25.           set gSpeed to gSpeed + (difH * gMoviePixel)
  26.         end if
  27.       end if
  28.     end if
  29.     if gSpeed < 0 then
  30.       set gSpeed to 0
  31.     end if
  32.     updateStage()
  33.   end repeat
  34.   set the movieRate of sprite 2 to gSpeed
  35.   updateStage()
  36.   cursor(0)
  37. end
  38.